package com.shiku.im.security.dao;

import com.shiku.common.model.PageResult;
import com.shiku.im.repository.IMongoDAO;
import com.shiku.im.security.entity.SecurityRole;
import org.bson.types.ObjectId;

import java.util.List;

/**
 * @Description: TODO
 * @Author xie yuan yang
 * @Date 2020/3/6
 **/
public interface SecurityRoleDao extends IMongoDAO<SecurityRole, ObjectId> {

    //添加角色
    public SecurityRole sava(SecurityRole securityRole);

    //删除角色
    public void deleteRole(ObjectId id);

    //修改角色
    public void updateRole(SecurityRole securityRole);

    //修改角色资源权限
    public void updateRoleResource(ObjectId roleId, List<String> roleResourceList);

    //查询全部角色
    public PageResult<SecurityRole> querySecurityRole(int pageIndex, int pageSize);

    //根据Id查询角色
    public SecurityRole querySecurityRoleById(ObjectId id);


    public List<SecurityRole> querySecurityRol1e();

    public SecurityRole querySecurityRoleByRoleName(String name);

    //根据角色类型查询 角色信息
    public SecurityRole querySecurityRoleNameByType(byte roleType);
}
